const fs = require("fs");
const path = require("path");
function deleteDir(dirpath) {
    if(fs.statSync(dirpath).isFile()) {
        fs.unlinkSync(dirpath);
    } else if (fs.statSync(dirpath).isDirectory()) {
        if(fs.readdirSync(dirpath).length !== 0) {
            fs.readdirSync(dirpath).forEach(item => {
                let filePath = path.join(dirpath , item);
                if(fs.statSync(filePath).isDirectory()) {
                    deleteDir(filePath);
                } else if(fs.statSync(filePath).isFile()) {
                    fs.unlinkSync(filePath);
                }
            })
        }
        fs.rmdirSync(dirpath);
    }
}
// let dirpath = path.join(__dirname , process.argv[2]);
// deleteDir(dirpath);

//这个就是进行一个断点调试 ， 让程序在这个地方停止
debugger;

let buffer = Buffer.from([1,2,3,4,5,6,7]);
console.log(buffer.toString('base64'));
let buffer1 = Buffer.from(buffer)
// console.log(buffer1.toString());
let buffer2 = Buffer.from("dwhhioadshdiowndioansoc" , "utf8");
console.log(buffer2);
console.log(buffer2.toString());